﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace apparatus
{
    public partial class main_edit : Form
    {
        public main_edit()
        {
            InitializeComponent();
        }

        private void mainBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            
            
        }

        private void main_edit_Load(object sender, EventArgs e)
        {
                            
                
                // TODO: 这行代码将数据加载到表“db1DataSet.main”中。您可以根据需要移动或移除它。
           // this.mainTableAdapter.Fill(this.db1DataSet.main);

        }

        private void textBox1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyValue == 13) btnok_Click(null, null);
        }

        private void btnok_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "")
                MessageBox.Show("请输入仪表编号!");
            else
                this.mainTableAdapter.FillByNo(this.db1DataSet.main, textBox1.Text);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Validate();
            this.mainBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.db1DataSet);
        }


    }
}
